package com.zlx.store.common.constant;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;

@ApiModel("商品折扣设置")
@Getter
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum DiscountConstant {
    ONE_PERCENT(99,"99折，最低折扣"),
    THIRTY_PERCENT(70,"7折，临期品默认折扣"),
    FIFTY_PERCENT(50,"半价"),
    NINETY_PERCENT(10,"1折，最高折扣");

    @ApiModelProperty(name = "code",notes = "10-99为1-9.9折")
    private final int code;
    @ApiModelProperty(name = "msg",notes = "折扣描述")
    private final String msg;
    DiscountConstant(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
